<!-- 主页-报价协议-新增 -->
<script src="js/CertusFileUpload.js"></script>
<section id="container">
    <!--main content start-->
    <section id="main-content">
        <section class="wrapper">
            <!--state overview end-->
            <div class="row">
                <div class="col-lg-12">
                    <div class="alert alert-block alert-warning fade in">
                        <button data-dismiss="alert" class="close close-sm" type="button">
                            <i class="icon-remove"></i>
                        </button>
                        <strong>备注说明：</strong>
                        一个报价协议对应一个审批流程，一个报价协议可以包含多个采购条目或单个采购条目。
                    </div>
                    <section class="panel">
                        <header class="panel-heading">
                            采购清单
                        </header>
                        <div class="panel-body">
                            <div id="purchaselistContainer" class="dlshouwen-grid-container"></div>
                            <div id="purchaselistToolBarContainer" class="dlshouwen-grid-toolbar-container"></div>
                        </div>
                    </section>

                    <section class="panel">
                        <header class="panel-heading">
                            比价单
                        </header>
                        <div class="panel-body">
                            <div id="comparisionListId" class="dlshouwen-grid-container"></div>
                            <div id="comparisionListIdContainer" class="dlshouwen-grid-toolbar-container"></div>
                        </div>
                    </section>

                    <section class="panel" style="display:none;">
                        <header class="panel-heading">
                            供应商报价列表
                            <i class="add-icon icon-eye-open"> 全部</i>
                        </header>
                        <div class="panel-body">
                            <div id="pricelogContainer" class="dlshouwen-grid-container"></div>
                            <div id="pricelogToolBarContainer" class="dlshouwen-grid-toolbar-container"></div>
                        </div>
                    </section>

                    <section class="panel">
                        <header class="panel-heading">
                            供应商报价协议(报价协议，根据不同归属分公司，合同编号进行自动生成。)
                        </header>
                        <div class="panel-body">
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">比价单</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" value="" certus-required certus-an-limit-length="50" placeholder="请输入比价单编号" ng-model="agreement.pcsCode" ng-change="pcdCodeChange()">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">供应商名称</label>
                                <div class="col-sm-10">
                                    <select class="form-control" certus-required  ng-model="agreement.supplierName" >
                                        <option ng-repeat="x in agreement.suppliernameSelect" value="{{x.name}}">
                                            {{x.name}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">归属分公司</label>
                                <div class="col-sm-10">
                                    <select class="form-control" certus-required ng-model="agreement.affiliateCode" ng-change="affiliationChange()">
                                        <option value="{{x.code}}" ng-repeat="x in select.affiliationSelect" >
                                            {{x.name}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">合同编号</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" certus-an-limit-length="50" certus-required disabled ng-model="agreement.contractCode">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">价格(含税&折扣)</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" certus-an-limit-length="50" certus-required ng-model="agreement.priceDiscount">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">交货期</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" certus-an-limit-length="50" certus-required ng-model="agreement.deliveryDate">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">质保期</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" certus-an-limit-length="50" certus-required ng-model="agreement.guaranteeDate">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">付款方式</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" certus-an-limit-length="50" certus-required ng-model="agreement.paymentMethod">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">留言</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" certus-an-limit-length="120" ng-model="agreement.agreementMsg" placeholder="字数长度限制(120字以内)"></textarea>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">文件上传*</label>
                                <div class="col-sm-10">
                                    <a class="upload-icon" onclick="shuplod();">上传附件</a>
                                </div>
                            </div>
                        </div>
                    </section>
                    <section class="panel shuplod" style="display:none;">
                        <header class="panel-heading">
                            文件上传
                        </header>
                        <div class="panel-body">
                            <div ng-include="'templates/upload-file.html'"></div>
                            <p class="default-buttons">
                                <a href="javascript:void(0);" class="button-back btn btn-info" onclick="shuplod()">取消</a>
                                <a href="javascript:void(0);" class="button-next  btn btn-info" ng-click="agreementFileSubmit()">提交</a>
                            </p>
                        </div>
                    </section>
                    <section class="panel">
                        <div class="panel-body">
                            <p class="default-buttons">
                                <a href="javascript:void(0);" class="button-back btn btn-info" onclick="window.history.back()">返回</a>
                                <a href="javascript:void(0);" class="button-next  btn btn-success" ng-click="agreementSubmit()">确认提交</a>
                            </p>
                        </div>
                    </section>

                </div>
            </div>
        </section>
    </section>
    <!--main content end-->
</section>

<script type="text/javascript" src="js/agreement/agreement.js"></script>